import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/courseDescription'
        },
        {
            path: '/',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            meta: { title: '自述文件' },
            children:[
                // {
                //     path: '/dashboard',
                //     component: resolve => require(['../components/page/Dashboard.vue'], resolve),
                //     meta: { title: '系统首页' }
                // },
                // {
                //     path: '/table',
                //     component: resolve => require(['../components/page/BaseTable.vue'], resolve),
                //     meta: { title: '基础表格' }
                // },
                // {
                //     path: '/tabs',
                //     component: resolve => require(['../components/page/Tabs.vue'], resolve),
                //     meta: { title: 'tab选项卡' }
                // },
                // {
                //     path: '/form',
                //     component: resolve => require(['../components/page/BaseForm.vue'], resolve),
                //     meta: { title: '基本表单' }
                // },
                // {
                //     // 富文本编辑器组件
                //     path: '/editor',
                //     component: resolve => require(['../components/page/VueEditor.vue'], resolve),
                //     meta: { title: '富文本编辑器' }
                // },
                // {
                //     // markdown组件
                //     path: '/markdown',
                //     component: resolve => require(['../components/page/Markdown.vue'], resolve),
                //     meta: { title: 'markdown编辑器' }
                // },
                // {
                //     // 图片上传组件
                //     path: '/upload',
                //     component: resolve => require(['../components/page/Upload.vue'], resolve),
                //     meta: { title: '文件上传' }
                // },
                // {
                //     // vue-schart组件
                //     path: '/charts',
                //     component: resolve => require(['../components/page/BaseCharts.vue'], resolve),
                //     meta: { title: 'schart图表' }
                // },
                // {
                //     // 拖拽列表组件
                //     path: '/drag',
                //     component: resolve => require(['../components/page/DragList.vue'], resolve),
                //     meta: { title: '拖拽列表' }
                // },
                // {
                //     // 权限页面
                //     path: '/permission',
                //     component: resolve => require(['../components/page/Permission.vue'], resolve),
                //     meta: { title: '权限测试'}
                // },
                {
                    // 批次管理
                    path: '/batchManage',
                    component: resolve => require(['../components/page/StudentManage/BatchManage/BatchManage.vue'], resolve),
                    meta: { title: '批次管理', permission: true }
                },
                {
                    // 学员批次
                    path: '/studentBatch',
                    component: resolve => require(['../components/page/StudentManage/StudentBatch/StudentBatch.vue'], resolve),
                    meta: { title: '学员批次', permission: true }
                },
                {
                    // 作业管理
                    path: '/jobManage',
                    component: resolve => require(['../components/page/StudentManage/JobManage/JobManage.vue'], resolve),
                    meta: { title: '作业管理', permission: true }
                },
                {
                    // 作业详情
                    path: '/JobDetails',
                    component: resolve => require(['../components/page/StudentManage/JobDetails/JobDetails.vue'], resolve),
                    meta: { title: '作业详情', permission: true }
                },
                {
                    // 课程批次管理
                    path: '/courseBatchManage',
                    component: resolve => require(['../components/page/CourseManage/CourseBatchManage/CourseBatchManage.vue'], resolve),
                    meta: { title: '课程批次管理', permission: true  }
                },
                {
                    // 课程类型管理
                    path: '/courseTypeManage',
                    component: resolve => require(['../components/page/CourseManage/CourseTypeManage/CourseTypeManage.vue'], resolve),
                    meta: { title: '课程类型管理', permission: true  }
                },
                {
                    // 课程内容管理
                    path: '/courseContentManage',
                    component: resolve => require(['../components/page/CourseManage/CourseContentManage/CourseContentManage.vue'], resolve),
                    meta: { title: '课程内容管理', permission: true  }
                },
                {
                    // 体验课类型管理
                    path: '/workshopTypeManage',
                    component: resolve => require(['../components/page/CourseManage/WorkshopTypeManage/WorkshopTypeManage.vue'], resolve),
                    meta: { title: '体验课类型管理', permission: true  }
                },
                {
                    // 体验课内容管理
                    path: '/workshopContentManage',
                    component: resolve => require(['../components/page/CourseManage/WorkshopContentManage/WorkshopContentManage.vue'], resolve),
                    meta: { title: '体验课内容管理', permission: true  }
                },
                // {
                //     // 小讲堂
                //     path: '/courseLessonManage',
                //     component: resolve => require(['../components/page/CourseManage/CourseLessonManage/CourseLessonManage.vue'], resolve),
                //     meta: { title: '小讲堂', permission: true  }
                // },
                {
                    // 动态管理
                    path: '/dynamicManage',
                    component: resolve => require(['../components/page/forumManage/dynamicManage/dynamicManage.vue'], resolve),
                    meta: { title: '动态管理', permission: true  }
                },
                {
                    // 投票管理
                    path: '/voteManage',
                    component: resolve => require(['../components/page/forumManage/voteManage/voteManage.vue'], resolve),
                    meta: { title: '投票管理', permission: true  }
                },
                {
                    // 推荐管理
                    path: '/recommendManage',
                    component: resolve => require(['../components/page/forumManage/recommendManage/recommendManage.vue'], resolve),
                    meta: { title: '推荐管理', permission: true  }
                },
                {
                    // 推荐管理
                    path: '/adoptManage',
                    component: resolve => require(['../components/page/forumManage/adoptManage/adoptManage.vue'], resolve),
                    meta: { title: '采纳管理', permission: true  }
                },
                {
                    // 暑期练琴
                    path: '/summerPractice',
                    component: resolve => require(['../components/page/activityManage/summerPractice/summerPractice.vue'], resolve),
                    meta: { title: '暑期练琴', permission: true  }
                },
                {
                    // 评论管理
                    path: '/commentManage',
                    component: resolve => require(['../components/page/CommentManage/CommentManage.vue'], resolve),
                    meta: { title: '评论管理', permission: true  }
                },
                {
                    // 常见问题
                    path: '/question',
                    component: resolve => require(['../components/page/Question/Question.vue'], resolve),
                    meta: { title: '常见问题', permission: true  }
                },
                {
                    // 课程介绍
                    path: '/courseDescription',
                    component: resolve => require(['../components/page/CourseDescription/CourseDescription.vue'], resolve),
                    meta: { title: '课程介绍', permission: true}
                },
                {
                    // 意志计划
                    path: '/volitionProject',
                    component: resolve => require(['../components/page/VolitionProject/VolitionProject.vue'], resolve),
                    meta: { title: '意志计划', permission: true}
                },
                {
                    // 邀请码管理
                    path: '/inviteManage',
                    component: resolve => require(['../components/page/inviteManage/inviteManage.vue'], resolve),
                    meta: { title: '邀请码管理',  }
                },
                {
                    // 订单
                    path: '/orderManage',
                    component: resolve => require(['../components/page/orderManage/orderManage.vue'], resolve),
                    meta: { title: '订单管理', permission: true  }
                },
                {
                    // 礼盒兑换管理
                    path: '/giftManage',
                    component: resolve => require(['../components/page/giftManage/giftManage.vue'], resolve),
                    meta: { title: '礼盒兑换管理', permission: true  }
                },
                {
                    // 打卡分享
                    path: '/clockSharing',
                    component: resolve => require(['../components/page/ClockSharing/ClockSharing.vue'], resolve),
                    meta: { title: '打卡分享', permission: true}
                },
                {
                    // 敏感词管理
                    path: '/sensitive',
                    component: resolve => require(['../components/page/Sensitive/Sensitive.vue'], resolve),
                    meta: { title: '敏感词管理', permission: true}
                },
                {
                    // 请老师点评
                    path: '/inviteComment',
                    component: resolve => require(['../components/page/InviteComment/InviteComment.vue'], resolve),
                    meta: { title: '请老师点评', permission: true}
                },
                {
                    // 举报管理
                    path: '/informManage',
                    component: resolve => require(['../components/page/InformManage/informManage.vue'], resolve),
                    meta: { title: '举报管理', permission: true}
                },
                {
                    // 校验敏感词
                    path: '/checkSensitive',
                    component: resolve => require(['../components/page/CheckSensitive/CheckSensitive.vue'], resolve),
                    meta: { title: '校验敏感词', permission: true}
                }
                
            ]
        },
        {
            // 权限页面
            path: '/knowledgeExtension',
            component: resolve => require(['../components/page/knowledgeExtension.vue'], resolve),
            meta: { title: '知识延伸'}
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
        {
            path: '/404',
            component: resolve => require(['../components/page/404.vue'], resolve)
        },
        {
            path: '/403',
            component: resolve => require(['../components/page/403.vue'], resolve)
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})
